export const NodeTypes = {
    ROOT: 'ROOT',//根节点
    ELEMENT: 'ELEMENT',//元素节点
    TEXT: 'TEXT',//文本节点
    SIMPLE_EXPRESSION: 'SIMPLE_EXPRESSION',//表达式
    INTERPOLATION: 'INTERPOLATION',//插值语法
    ATTRIBUTE: 'ATTRIBUTE',//属性
    DIRECTIVE: 'DIRECTIVE',//指令 
};

export const ElementTypes = {
    ELEMENT: 'ELEMENT',
    COMPONENT: 'COMPONENT',
};

export function createRoot(children) {
    return {
        type: NodeTypes.ROOT,
        children,
    }
}